<template>
    <div>
        <h1>详情</h1>
        <table class="table">
            <thead>
                <tr>
                    <td>房间类型</td>
                    <td>
                        <span>{{ obj.typeName }}</span>
                    </td>
                </tr>
                <tr>
                    <td>房号</td>
                    <td>
                        <span>{{ obj.houseNo }}</span>
                    </td>
                </tr>
                <tr>
                    <td>备注</td>
                    <td>
                        <span>{{ obj.remark }}</span>
                    </td>
                </tr>
                <tr>
                    <td>是否删除</td>
                    <td>
                        <span>{{ obj.isDelete?"是":"否" }}</span>
                    </td>
                </tr>
                <tr>
                    <td>是否启用</td>
                    <td>
                        <span>{{ obj.isActive?"启用":"禁用" }}</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input type="button" value="返回显示列表" @click="Cancel" class="btn">
                    </td>
                </tr>
            </thead>
        </table>

    </div>
</template>

<script setup lang="ts">
import { onMounted,ref } from 'vue';
import { useRoute,useRouter } from 'vue-router';
import axios from 'axios';
const router = useRouter();
const route=useRoute();

onMounted(()=>{
    GetData();
})
const obj=ref({
   "updateDate": "2025-02-08T02:48:17.189",
    "createDate": "2025-02-08T02:48:17.189",
    "isDelete": true,
    "isActive": false,
    "hI_Id": 1,
    "houseTypeId": 1,
    "houseNo": "string",
    "remark": "string",
    "typeName": "标准间"
})
//根据编号读取房号数据
const GetData=()=>{
     var id = route.query.id;
     axios.get("https://localhost:7275/api/HouseNum/GetHouseNumId",{params:{id:id}}).then(res=>{
        obj.value = res.data;
        debugger
     })
}


const Cancel=()=>{
    router.push({path: '/Show'});
}

</script>